<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑房间类型信息</title>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
<script>
$(function(){
	
	$('#formSave').submit(function(){
	
		var typeName =$('#formSave input[name=typeName]').val();
		var status =$('#formSave select[name=status]').val();
		
		if(typeName==''||typeName==null){
			alert("请填写必填项！");
			return false;
		}
		
		if(status==''||status==null){
			alert("请填写必填项！");
			return false;
		}
	
	
	});

});

</script>

</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">表单</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>房间类型信息</span></div>
    <form action="/servlet/RoomTypeServlet" method="post" id="formSave">
    	<input type="hidden" name="typeId" value="">
    	<input type="hidden" name="operate" value="save">
	    <ul class="forminfo">
		    <li><label>类型</label><input name="typeName" value="${roomType.typeName }"   type="text"  required="required" class="dfinput" /></li>
		    <li><label>单价</label><input name="price"    value="${roomType.price} " type="text" class="dfinput" /><i>元/次</i></li>
		    <li><label>押金</label><input name="deposit"  value="${roomType.deposit}" type="text" class="dfinput" /><i>元/次</i></li>
		    <li>
		    	<label>状态</label>
		    	<select name="status" class="dfinput" required="required">
		    		<option>请选择</option>
		    		<option value="1" <c:if test="${roomType.status==1}"> selected="selected" </c:if>>正常</option>
		    		<option value="0" <c:if test="${roomType.status==0}"> selected="selected" </c:if>>禁用</option>
		    	</select>
		    </li>
		    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"/></li>
	    </ul>
    </form>
    
    </div>


</body>

</html>
